<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<canvas id="ss" width="1000" height="500"></canvas>
<script>


var lineData =["[{\"type\":0,\"x\":103.56,\"y\":31.67,\"ts\":358505646},{\"type\":1,\"x\":103.59,\"y\":31.71,\"ts\":358505646},{\"type\":1,\"x\":103.59,\"y\":31.74,\"ts\":358505646},{\"type\":1,\"x\":103.6,\"y\":31.77,\"ts\":358505646},{\"type\":1,\"x\":103.63,\"y\":31.8,\"ts\":358505646},{\"type\":1,\"x\":103.64,\"y\":31.81,\"ts\":358505646},{\"type\":1,\"x\":103.64,\"y\":31.82,\"ts\":358505646},{\"type\":1,\"x\":103.66,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":103.67,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":103.69,\"y\":31.85,\"ts\":358505646},{\"type\":1,\"x\":103.73,\"y\":31.87,\"ts\":358505646},{\"type\":1,\"x\":103.78,\"y\":31.88,\"ts\":358505646},{\"type\":1,\"x\":103.84,\"y\":31.9,\"ts\":358505646},{\"type\":1,\"x\":103.95,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":103.98,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.13,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.29,\"y\":31.92,\"ts\":358505646},{\"type\":1,\"x\":104.42,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.49,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.6,\"y\":31.88,\"ts\":358505646},{\"type\":1,\"x\":104.7,\"y\":31.85,\"ts\":358505646},{\"type\":1,\"x\":104.78,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.82,\"y\":31.83,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.86,\"ts\":358505646},{\"type\":1,\"x\":104.83,\"y\":31.87,\"ts\":358505646},{\"type\":1,\"x\":104.83,\"y\":31.87,\"ts\":358505646},{\"type\":1,\"x\":104.91,\"y\":31.95,\"ts\":358505646},{\"type\":1,\"x\":104.9,\"y\":31.96,\"ts\":358505646},{\"type\":1,\"x\":104.9,\"y\":31.99,\"ts\":358505646},{\"type\":1,\"x\":104.88,\"y\":32.05,\"ts\":358505646},{\"type\":1,\"x\":104.72,\"y\":32.22,\"ts\":358505646},{\"type\":1,\"x\":104.66,\"y\":32.39,\"ts\":358505646},{\"type\":1,\"x\":104.63,\"y\":32.59,\"ts\":358505646},{\"type\":1,\"x\":104.58,\"y\":32.73,\"ts\":358505646},{\"type\":1,\"x\":104.51,\"y\":32.95,\"ts\":358505646},{\"type\":0,\"x\":101.02,\"y\":41.68,\"ts\":358505648},{\"type\":1,\"x\":101.04,\"y\":41.69,\"ts\":358505648},{\"type\":1,\"x\":101.04,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.05,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.03,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.05,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.02,\"y\":41.74,\"ts\":358505648},{\"type\":1,\"x\":101.01,\"y\":41.77,\"ts\":358505648},{\"type\":1,\"x\":100.97,\"y\":41.84,\"ts\":358505648},{\"type\":1,\"x\":100.87,\"y\":42.01,\"ts\":358505648},{\"type\":1,\"x\":100.79,\"y\":42.18,\"ts\":358505648},{\"type\":1,\"x\":100.61,\"y\":42.59,\"ts\":358505648},{\"type\":1,\"x\":100.53,\"y\":42.8,\"ts\":358505648},{\"type\":1,\"x\":100.48,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":100.44,\"y\":43.25,\"ts\":358505648},{\"type\":1,\"x\":100.41,\"y\":43.46,\"ts\":358505648},{\"type\":1,\"x\":100.41,\"y\":43.65,\"ts\":358505648},{\"type\":1,\"x\":100.41,\"y\":43.78,\"ts\":358505648},{\"type\":1,\"x\":100.42,\"y\":43.92,\"ts\":358505648},{\"type\":1,\"x\":100.47,\"y\":44.04,\"ts\":358505648},{\"type\":1,\"x\":100.52,\"y\":44.13,\"ts\":358505648},{\"type\":1,\"x\":100.59,\"y\":44.17,\"ts\":358505648},{\"type\":1,\"x\":100.64,\"y\":44.18,\"ts\":358505648},{\"type\":1,\"x\":100.7,\"y\":44.16,\"ts\":358505648},{\"type\":1,\"x\":100.9,\"y\":44.08,\"ts\":358505648},{\"type\":1,\"x\":100.91,\"y\":43.93,\"ts\":358505648},{\"type\":1,\"x\":101.02,\"y\":43.76,\"ts\":358505648},{\"type\":1,\"x\":101.11,\"y\":43.61,\"ts\":358505648},{\"type\":1,\"x\":101.19,\"y\":43.41,\"ts\":358505648},{\"type\":1,\"x\":101.23,\"y\":43.3,\"ts\":358505648},{\"type\":1,\"x\":101.27,\"y\":43.2,\"ts\":358505648},{\"type\":1,\"x\":101.27,\"y\":43.11,\"ts\":358505648},{\"type\":1,\"x\":101.23,\"y\":43.05,\"ts\":358505648},{\"type\":1,\"x\":101.2,\"y\":43.02,\"ts\":358505648},{\"type\":1,\"x\":101.16,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":101.12,\"y\":42.99,\"ts\":358505648},{\"type\":1,\"x\":101.06,\"y\":42.99,\"ts\":358505648},{\"type\":1,\"x\":100.97,\"y\":42.99,\"ts\":358505648},{\"type\":1,\"x\":100.89,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":100.84,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":100.72,\"y\":43.05,\"ts\":358505648},{\"type\":1,\"x\":100.67,\"y\":43.08,\"ts\":358505648},{\"type\":1,\"x\":100.62,\"y\":43.12,\"ts\":358505648},{\"type\":2,\"x\":100.54,\"y\":43.2,\"ts\":358505648}]","[{\"type\":0,\"x\":101.16,\"y\":38.84,\"ts\":358505649},{\"type\":1,\"x\":101.17,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.19,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.22,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.25,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.31,\"y\":38.84,\"ts\":358505649},{\"type\":1,\"x\":101.38,\"y\":38.84,\"ts\":358505649},{\"type\":1,\"x\":101.46,\"y\":38.87,\"ts\":358505649},{\"type\":1,\"x\":101.55,\"y\":38.88,\"ts\":358505649},{\"type\":1,\"x\":101.67,\"y\":38.93,\"ts\":358505649},{\"type\":1,\"x\":101.8,\"y\":39.03,\"ts\":358505649},{\"type\":1,\"x\":101.85,\"y\":39.1,\"ts\":358505649},{\"type\":1,\"x\":101.86,\"y\":39.21,\"ts\":358505649},{\"type\":1,\"x\":101.84,\"y\":39.3,\"ts\":358505649},{\"type\":1,\"x\":101.78,\"y\":39.39,\"ts\":358505649},{\"type\":1,\"x\":101.7,\"y\":39.52,\"ts\":358505649},{\"type\":1,\"x\":101.57,\"y\":39.6,\"ts\":358505649},{\"type\":1,\"x\":101.46,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":101.34,\"y\":39.77,\"ts\":358505649},{\"type\":1,\"x\":101.22,\"y\":39.81,\"ts\":358505649},{\"type\":1,\"x\":101.1,\"y\":39.85,\"ts\":358505649},{\"type\":1,\"x\":100.91,\"y\":39.91,\"ts\":358505649},{\"type\":1,\"x\":100.88,\"y\":39.91,\"ts\":358505649},{\"type\":1,\"x\":100.84,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.82,\"y\":39.93,\"ts\":358505649},{\"type\":1,\"x\":100.81,\"y\":39.93,\"ts\":358505649},{\"type\":1,\"x\":100.8,\"y\":39.94,\"ts\":358505649},{\"type\":1,\"x\":100.82,\"y\":39.93,\"ts\":358505649},{\"type\":1,\"x\":100.82,\"y\":39.94,\"ts\":358505649},{\"type\":1,\"x\":100.83,\"y\":39.94,\"ts\":358505649},{\"type\":1,\"x\":100.84,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.84,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.86,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.9,\"y\":39.91,\"ts\":358505649},{\"type\":1,\"x\":100.96,\"y\":39.88,\"ts\":358505649},{\"type\":1,\"x\":101.08,\"y\":39.85,\"ts\":358505649},{\"type\":1,\"x\":101.27,\"y\":39.79,\"ts\":358505649},{\"type\":1,\"x\":101.48,\"y\":39.73,\"ts\":358505649},{\"type\":1,\"x\":101.65,\"y\":39.72,\"ts\":358505649},{\"type\":1,\"x\":101.82,\"y\":39.69,\"ts\":358505649},{\"type\":1,\"x\":102.01,\"y\":39.69,\"ts\":358505649},{\"type\":1,\"x\":102.13,\"y\":39.69,\"ts\":358505649},{\"type\":1,\"x\":102.18,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505651},{\"type\":2,\"x\":102.18,\"y\":39.7,\"ts\":358505651}]","[{\"type\":0,\"x\":102.92,\"y\":38.27,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":38.29,\"ts\":358505650},{\"type\":1,\"x\":102.98,\"y\":38.3,\"ts\":358505650},{\"type\":1,\"x\":103.02,\"y\":38.28,\"ts\":358505650},{\"type\":1,\"x\":103.08,\"y\":38.3,\"ts\":358505650},{\"type\":1,\"x\":103.16,\"y\":38.31,\"ts\":358505650},{\"type\":1,\"x\":103.2,\"y\":38.33,\"ts\":358505650},{\"type\":1,\"x\":103.32,\"y\":38.35,\"ts\":358505650},{\"type\":1,\"x\":103.41,\"y\":38.38,\"ts\":358505650},{\"type\":1,\"x\":103.52,\"y\":38.38,\"ts\":358505650},{\"type\":1,\"x\":103.62,\"y\":38.45,\"ts\":358505650},{\"type\":1,\"x\":103.7,\"y\":38.48,\"ts\":358505650},{\"type\":1,\"x\":103.76,\"y\":38.48,\"ts\":358505650},{\"type\":1,\"x\":103.81,\"y\":38.56,\"ts\":358505650},{\"type\":1,\"x\":103.84,\"y\":38.59,\"ts\":358505650},{\"type\":1,\"x\":103.84,\"y\":38.63,\"ts\":358505650},{\"type\":1,\"x\":103.83,\"y\":38.66,\"ts\":358505650},{\"type\":1,\"x\":103.75,\"y\":38.77,\"ts\":358505650},{\"type\":1,\"x\":103.68,\"y\":38.84,\"ts\":358505650},{\"type\":1,\"x\":103.62,\"y\":38.89,\"ts\":358505650},{\"type\":1,\"x\":103.53,\"y\":38.96,\"ts\":358505650},{\"type\":1,\"x\":103.39,\"y\":39.01,\"ts\":358505650},{\"type\":1,\"x\":103.29,\"y\":39.03,\"ts\":358505650},{\"type\":1,\"x\":103.17,\"y\":39.05,\"ts\":358505650},{\"type\":1,\"x\":103.09,\"y\":39.06,\"ts\":358505650},{\"type\":1,\"x\":103.01,\"y\":39.06,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.93,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.93,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.06,\"ts\":358505650},{\"type\":1,\"x\":102.98,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":103.03,\"y\":39.08,\"ts\":358505650},{\"type\":1,\"x\":103.09,\"y\":39.08,\"ts\":358505650},{\"type\":1,\"x\":103.2,\"y\":39.1,\"ts\":358505650},{\"type\":1,\"x\":103.3,\"y\":39.1,\"ts\":358505650},{\"type\":1,\"x\":103.41,\"y\":39.11,\"ts\":358505650},{\"type\":1,\"x\":103.52,\"y\":39.16,\"ts\":358505650},{\"type\":1,\"x\":103.59,\"y\":39.2,\"ts\":358505650},{\"type\":1,\"x\":103.69,\"y\":39.26,\"ts\":358505650},{\"type\":1,\"x\":103.88,\"y\":39.29,\"ts\":358505650},{\"type\":1,\"x\":103.92,\"y\":39.34,\"ts\":358505650},{\"type\":1,\"x\":103.95,\"y\":39.41,\"ts\":358505650},{\"type\":1,\"x\":103.92,\"y\":39.48,\"ts\":358505650},{\"type\":1,\"x\":103.95,\"y\":39.59,\"ts\":358505650},{\"type\":1,\"x\":103.95,\"y\":39.59,\"ts\":358505651},{\"type\":1,\"x\":103.95,\"y\":39.62,\"ts\":358505651},{\"type\":1,\"x\":103.95,\"y\":39.73,\"ts\":358505651},{\"type\":1,\"x\":103.88,\"y\":39.74,\"ts\":358505651},{\"type\":1,\"x\":103.81,\"y\":39.84,\"ts\":358505651},{\"type\":1,\"x\":103.69,\"y\":39.95,\"ts\":358505651},{\"type\":1,\"x\":103.56,\"y\":40.04,\"ts\":358505651},{\"type\":2,\"x\":103.45,\"y\":40.12,\"ts\":358505651}]","[{\"type\":0,\"x\":103.56,\"y\":31.67,\"ts\":358505646},{\"type\":1,\"x\":103.59,\"y\":31.71,\"ts\":358505646},{\"type\":1,\"x\":103.59,\"y\":31.74,\"ts\":358505646},{\"type\":1,\"x\":103.6,\"y\":31.77,\"ts\":358505646},{\"type\":1,\"x\":103.63,\"y\":31.8,\"ts\":358505646},{\"type\":1,\"x\":103.64,\"y\":31.81,\"ts\":358505646},{\"type\":1,\"x\":103.64,\"y\":31.82,\"ts\":358505646},{\"type\":1,\"x\":103.66,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":103.67,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":103.69,\"y\":31.85,\"ts\":358505646},{\"type\":1,\"x\":103.73,\"y\":31.87,\"ts\":358505646},{\"type\":1,\"x\":103.78,\"y\":31.88,\"ts\":358505646},{\"type\":1,\"x\":103.84,\"y\":31.9,\"ts\":358505646},{\"type\":1,\"x\":103.95,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":103.98,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.13,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.29,\"y\":31.92,\"ts\":358505646},{\"type\":1,\"x\":104.42,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.49,\"y\":31.91,\"ts\":358505646},{\"type\":1,\"x\":104.6,\"y\":31.88,\"ts\":358505646},{\"type\":1,\"x\":104.7,\"y\":31.85,\"ts\":358505646},{\"type\":1,\"x\":104.78,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.82,\"y\":31.83,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.84,\"ts\":358505646},{\"type\":1,\"x\":104.84,\"y\":31.86,\"ts\":358505646},{\"type\":1,\"x\":104.83,\"y\":31.87,\"ts\":358505646},{\"type\":1,\"x\":104.83,\"y\":31.87,\"ts\":358505646},{\"type\":1,\"x\":104.91,\"y\":31.95,\"ts\":358505646},{\"type\":1,\"x\":104.9,\"y\":31.96,\"ts\":358505646},{\"type\":1,\"x\":104.9,\"y\":31.99,\"ts\":358505646},{\"type\":1,\"x\":104.88,\"y\":32.05,\"ts\":358505646},{\"type\":1,\"x\":104.72,\"y\":32.22,\"ts\":358505646},{\"type\":1,\"x\":104.66,\"y\":32.39,\"ts\":358505646},{\"type\":1,\"x\":104.63,\"y\":32.59,\"ts\":358505646},{\"type\":1,\"x\":104.58,\"y\":32.73,\"ts\":358505646},{\"type\":1,\"x\":104.51,\"y\":32.95,\"ts\":358505646},{\"type\":0,\"x\":101.02,\"y\":41.68,\"ts\":358505648},{\"type\":1,\"x\":101.04,\"y\":41.69,\"ts\":358505648},{\"type\":1,\"x\":101.04,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.05,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.03,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.05,\"y\":41.7,\"ts\":358505648},{\"type\":1,\"x\":101.02,\"y\":41.74,\"ts\":358505648},{\"type\":1,\"x\":101.01,\"y\":41.77,\"ts\":358505648},{\"type\":1,\"x\":100.97,\"y\":41.84,\"ts\":358505648},{\"type\":1,\"x\":100.87,\"y\":42.01,\"ts\":358505648},{\"type\":1,\"x\":100.79,\"y\":42.18,\"ts\":358505648},{\"type\":1,\"x\":100.61,\"y\":42.59,\"ts\":358505648},{\"type\":1,\"x\":100.53,\"y\":42.8,\"ts\":358505648},{\"type\":1,\"x\":100.48,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":100.44,\"y\":43.25,\"ts\":358505648},{\"type\":1,\"x\":100.41,\"y\":43.46,\"ts\":358505648},{\"type\":1,\"x\":100.41,\"y\":43.65,\"ts\":358505648},{\"type\":1,\"x\":100.41,\"y\":43.78,\"ts\":358505648},{\"type\":1,\"x\":100.42,\"y\":43.92,\"ts\":358505648},{\"type\":1,\"x\":100.47,\"y\":44.04,\"ts\":358505648},{\"type\":1,\"x\":100.52,\"y\":44.13,\"ts\":358505648},{\"type\":1,\"x\":100.59,\"y\":44.17,\"ts\":358505648},{\"type\":1,\"x\":100.64,\"y\":44.18,\"ts\":358505648},{\"type\":1,\"x\":100.7,\"y\":44.16,\"ts\":358505648},{\"type\":1,\"x\":100.9,\"y\":44.08,\"ts\":358505648},{\"type\":1,\"x\":100.91,\"y\":43.93,\"ts\":358505648},{\"type\":1,\"x\":101.02,\"y\":43.76,\"ts\":358505648},{\"type\":1,\"x\":101.11,\"y\":43.61,\"ts\":358505648},{\"type\":1,\"x\":101.19,\"y\":43.41,\"ts\":358505648},{\"type\":1,\"x\":101.23,\"y\":43.3,\"ts\":358505648},{\"type\":1,\"x\":101.27,\"y\":43.2,\"ts\":358505648},{\"type\":1,\"x\":101.27,\"y\":43.11,\"ts\":358505648},{\"type\":1,\"x\":101.23,\"y\":43.05,\"ts\":358505648},{\"type\":1,\"x\":101.2,\"y\":43.02,\"ts\":358505648},{\"type\":1,\"x\":101.16,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":101.12,\"y\":42.99,\"ts\":358505648},{\"type\":1,\"x\":101.06,\"y\":42.99,\"ts\":358505648},{\"type\":1,\"x\":100.97,\"y\":42.99,\"ts\":358505648},{\"type\":1,\"x\":100.89,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":100.84,\"y\":43.0,\"ts\":358505648},{\"type\":1,\"x\":100.72,\"y\":43.05,\"ts\":358505648},{\"type\":1,\"x\":100.67,\"y\":43.08,\"ts\":358505648},{\"type\":1,\"x\":100.62,\"y\":43.12,\"ts\":358505648},{\"type\":2,\"x\":100.54,\"y\":43.2,\"ts\":358505648}]","[{\"type\":0,\"x\":101.16,\"y\":38.84,\"ts\":358505649},{\"type\":1,\"x\":101.17,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.19,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.22,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.25,\"y\":38.83,\"ts\":358505649},{\"type\":1,\"x\":101.31,\"y\":38.84,\"ts\":358505649},{\"type\":1,\"x\":101.38,\"y\":38.84,\"ts\":358505649},{\"type\":1,\"x\":101.46,\"y\":38.87,\"ts\":358505649},{\"type\":1,\"x\":101.55,\"y\":38.88,\"ts\":358505649},{\"type\":1,\"x\":101.67,\"y\":38.93,\"ts\":358505649},{\"type\":1,\"x\":101.8,\"y\":39.03,\"ts\":358505649},{\"type\":1,\"x\":101.85,\"y\":39.1,\"ts\":358505649},{\"type\":1,\"x\":101.86,\"y\":39.21,\"ts\":358505649},{\"type\":1,\"x\":101.84,\"y\":39.3,\"ts\":358505649},{\"type\":1,\"x\":101.78,\"y\":39.39,\"ts\":358505649},{\"type\":1,\"x\":101.7,\"y\":39.52,\"ts\":358505649},{\"type\":1,\"x\":101.57,\"y\":39.6,\"ts\":358505649},{\"type\":1,\"x\":101.46,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":101.34,\"y\":39.77,\"ts\":358505649},{\"type\":1,\"x\":101.22,\"y\":39.81,\"ts\":358505649},{\"type\":1,\"x\":101.1,\"y\":39.85,\"ts\":358505649},{\"type\":1,\"x\":100.91,\"y\":39.91,\"ts\":358505649},{\"type\":1,\"x\":100.88,\"y\":39.91,\"ts\":358505649},{\"type\":1,\"x\":100.84,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.82,\"y\":39.93,\"ts\":358505649},{\"type\":1,\"x\":100.81,\"y\":39.93,\"ts\":358505649},{\"type\":1,\"x\":100.8,\"y\":39.94,\"ts\":358505649},{\"type\":1,\"x\":100.82,\"y\":39.93,\"ts\":358505649},{\"type\":1,\"x\":100.82,\"y\":39.94,\"ts\":358505649},{\"type\":1,\"x\":100.83,\"y\":39.94,\"ts\":358505649},{\"type\":1,\"x\":100.84,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.84,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.86,\"y\":39.92,\"ts\":358505649},{\"type\":1,\"x\":100.9,\"y\":39.91,\"ts\":358505649},{\"type\":1,\"x\":100.96,\"y\":39.88,\"ts\":358505649},{\"type\":1,\"x\":101.08,\"y\":39.85,\"ts\":358505649},{\"type\":1,\"x\":101.27,\"y\":39.79,\"ts\":358505649},{\"type\":1,\"x\":101.48,\"y\":39.73,\"ts\":358505649},{\"type\":1,\"x\":101.65,\"y\":39.72,\"ts\":358505649},{\"type\":1,\"x\":101.82,\"y\":39.69,\"ts\":358505649},{\"type\":1,\"x\":102.01,\"y\":39.69,\"ts\":358505649},{\"type\":1,\"x\":102.13,\"y\":39.69,\"ts\":358505649},{\"type\":1,\"x\":102.18,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505649},{\"type\":1,\"x\":102.2,\"y\":39.7,\"ts\":358505651},{\"type\":2,\"x\":102.18,\"y\":39.7,\"ts\":358505651}]","[{\"type\":0,\"x\":102.92,\"y\":38.27,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":38.29,\"ts\":358505650},{\"type\":1,\"x\":102.98,\"y\":38.3,\"ts\":358505650},{\"type\":1,\"x\":103.02,\"y\":38.28,\"ts\":358505650},{\"type\":1,\"x\":103.08,\"y\":38.3,\"ts\":358505650},{\"type\":1,\"x\":103.16,\"y\":38.31,\"ts\":358505650},{\"type\":1,\"x\":103.2,\"y\":38.33,\"ts\":358505650},{\"type\":1,\"x\":103.32,\"y\":38.35,\"ts\":358505650},{\"type\":1,\"x\":103.41,\"y\":38.38,\"ts\":358505650},{\"type\":1,\"x\":103.52,\"y\":38.38,\"ts\":358505650},{\"type\":1,\"x\":103.62,\"y\":38.45,\"ts\":358505650},{\"type\":1,\"x\":103.7,\"y\":38.48,\"ts\":358505650},{\"type\":1,\"x\":103.76,\"y\":38.48,\"ts\":358505650},{\"type\":1,\"x\":103.81,\"y\":38.56,\"ts\":358505650},{\"type\":1,\"x\":103.84,\"y\":38.59,\"ts\":358505650},{\"type\":1,\"x\":103.84,\"y\":38.63,\"ts\":358505650},{\"type\":1,\"x\":103.83,\"y\":38.66,\"ts\":358505650},{\"type\":1,\"x\":103.75,\"y\":38.77,\"ts\":358505650},{\"type\":1,\"x\":103.68,\"y\":38.84,\"ts\":358505650},{\"type\":1,\"x\":103.62,\"y\":38.89,\"ts\":358505650},{\"type\":1,\"x\":103.53,\"y\":38.96,\"ts\":358505650},{\"type\":1,\"x\":103.39,\"y\":39.01,\"ts\":358505650},{\"type\":1,\"x\":103.29,\"y\":39.03,\"ts\":358505650},{\"type\":1,\"x\":103.17,\"y\":39.05,\"ts\":358505650},{\"type\":1,\"x\":103.09,\"y\":39.06,\"ts\":358505650},{\"type\":1,\"x\":103.01,\"y\":39.06,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.93,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.93,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":102.95,\"y\":39.06,\"ts\":358505650},{\"type\":1,\"x\":102.98,\"y\":39.07,\"ts\":358505650},{\"type\":1,\"x\":103.03,\"y\":39.08,\"ts\":358505650},{\"type\":1,\"x\":103.09,\"y\":39.08,\"ts\":358505650},{\"type\":1,\"x\":103.2,\"y\":39.1,\"ts\":358505650},{\"type\":1,\"x\":103.3,\"y\":39.1,\"ts\":358505650},{\"type\":1,\"x\":103.41,\"y\":39.11,\"ts\":358505650},{\"type\":1,\"x\":103.52,\"y\":39.16,\"ts\":358505650},{\"type\":1,\"x\":103.59,\"y\":39.2,\"ts\":358505650},{\"type\":1,\"x\":103.69,\"y\":39.26,\"ts\":358505650},{\"type\":1,\"x\":103.88,\"y\":39.29,\"ts\":358505650},{\"type\":1,\"x\":103.92,\"y\":39.34,\"ts\":358505650},{\"type\":1,\"x\":103.95,\"y\":39.41,\"ts\":358505650},{\"type\":1,\"x\":103.92,\"y\":39.48,\"ts\":358505650},{\"type\":1,\"x\":103.95,\"y\":39.59,\"ts\":358505650},{\"type\":1,\"x\":103.95,\"y\":39.59,\"ts\":358505651},{\"type\":1,\"x\":103.95,\"y\":39.62,\"ts\":358505651},{\"type\":1,\"x\":103.95,\"y\":39.73,\"ts\":358505651},{\"type\":1,\"x\":103.88,\"y\":39.74,\"ts\":358505651},{\"type\":1,\"x\":103.81,\"y\":39.84,\"ts\":358505651},{\"type\":1,\"x\":103.69,\"y\":39.95,\"ts\":358505651},{\"type\":1,\"x\":103.56,\"y\":40.04,\"ts\":358505651},{\"type\":2,\"x\":103.45,\"y\":40.12,\"ts\":358505651}]"]
	
	function drawLine(lineData){
		var cxt = document.getElementById("ss").getContext("2d");
		var pointArr = lineData;
		var allPoint = [];
		var minx = miny = maxx = maxy = 0, cw, wh, first=true;

		for(var t=0; t<pointArr.length; t++){
			var answerSon = JSON.parse(pointArr[t]);
			for(var n=0; n<answerSon.length; n++){
				var dotJson = answerSon[n];
				if(first){
					minx = dotJson.x;	
					miny = dotJson.y;
					first = false;
				}
				
				minx = Math.min(minx, dotJson.x);
				miny = Math.min(miny, dotJson.y);
				maxx = Math.max(maxx, dotJson.x);
				maxy = Math.max(maxy, dotJson.y);
				
				allPoint.push({x:dotJson.x, y:dotJson.y, type:dotJson.type});
			}	
		}
		minx = minx - 3;
		miny = miny - 3;
		cw = maxx - minx + 3;
		var canvasWidth = Number(document.getElementById("ss").width) - 10;
		var scale = Math.min(canvasWidth / cw, 20);
		ch = (maxy - miny ) * scale + 10;
		for(var i=0; i<allPoint.length; i++){
			allPoint[i].x = (allPoint[i].x - minx)*scale;
			allPoint[i].y = (allPoint[i].y - miny)*scale;
		}
		//console.log(minx , miny , maxx , maxy )
		console.log(canvasWidth, cw, ch, scale)
		console.log(allPoint)
		drawAll(allPoint, cxt);
	}
	
	function drawAll(allPoint, cxt){
		cxt.beginPath();
		cxt.clearRect(-1000, -1000, 10000, 10000);
		cxt.beginPath();
		
		for(var q=0; q<allPoint.length; q++){
			
			if(allPoint[q].type == 0 || (q >0 && allPoint[q-1].type == 2)){
				cxt.moveTo(allPoint[q].x, allPoint[q].y);
			}else{
				cxt.lineTo(allPoint[q].x, allPoint[q].y);
			}
		}
		cxt.closePath;
		cxt.stroke();
		
	}

	// function copyText(){
	//   lineData.push(document.getElementById("data").value);
	//   drawLine(lineData);
	//   console.log("调用了")
	// }
	//copyText();
	var btn = document.querySelector('button');
	btn.addEventListener('click',function(){
		lineData.push(document.getElementById("data").value);
		  drawLine(lineData);
		  console.log("调用了")
	})
	
</script>

<form>
笔记:<br>
<input type="text" name="firstname" id = "data">
<button onclick="copyText()">确定</button>
</form>
</body>
</html>
